Repository navigation
Make {{ profile }} available to Jinja in blueprint vars - #85
Merged
Merged
Conversation
render_yaml_template builds its context with StrictUndefined, so the
active profile has to be passed in explicitly. show_vars was the only
one of the four call sites that did not, so a DAG using {{ profile }}
parsed and linted fine but could not be inspected.
jeremybeard
marked this pull request as ready for review
September 18, 2026 16:20
jeremybeard
marked this pull request as draft
September 18, 2026 16:31
jeremybeard
marked this pull request as ready for review
September 18, 2026 16:52
jlaneve
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
blueprint vars --profile <name>fails on any DAG whose YAML references{{ profile }}, withConfiguration Error ... Jinja2 template rendering failed: 'profile' is undefined. Such a DAG parses and lints without complaint, so only inspection was broken.render_yaml_templatebuilds its Jinja context withStrictUndefined, so the active profile must be passed in explicitly.show_varswas the only one of the four call sites that did not —Builder.build_dag(builder.py:336),build_all(builder.py:673) andvalidate_yaml, behindblueprint lint(loaders.py:302), all passcontext={"profile": profile}.Verified by reverting only the
cli.pychange with the new test in place: it fails with the reported error, and passes with the fix. Full unit suite is green (422 tests); ruff andtyclean.